using System;
using System.Collections.Generic;
using System.Text;
using HCP.Responses;
using HCP.SimpleJSON;
using JsonFx.Json;
using UnityEngine;

namespace HCP.Requests
{
	public class GetPlatformPerformance : JobRequest
	{
		public GetPlatformPerformance(JSONClass json) : base(json)
		{
		}

		public override JobResponse Process()
		{
			string value = string.Format("{0:N2}", PlayerPrefs.GetFloat("boottime", 0f));
			Dictionary<string, string> dictionary = new Dictionary<string, string>();
			dictionary["boottime"] = value;
			JsonWriterSettings jsonWriterSettings = new JsonWriterSettings();
			jsonWriterSettings.PrettyPrint = false;
			if (this.builder != null)
			{
				this.builder.Length = 0;
			}
			else
			{
				this.builder = new StringBuilder();
			}
			using (JsonWriter jsonWriter = new JsonWriter(this.builder, jsonWriterSettings))
			{
				jsonWriter.Write(dictionary);
			}
			return new StringResponse(this.builder.ToString());
		}

		private StringBuilder builder;
	}
}
